﻿using System.Windows.Media;
using GC_VKMD.BusinessEntities.Abstractions.Interfaces.Vkontakte;
using GC_VKMD.BusinessEntities.Enums.Vkontakte;

namespace GC_VKMD.MusicDownloaderClient.ViewModels
{
	public class MusicDownloaderReportItem
	{
		#region Properties

		public string Message { get; private set; }

		public ReportMessageType Type { get; private set; }

		public Brush Foreground
		{
			get
			{
				switch (Type)
				{
					case ReportMessageType.Info:
						return Brushes.Green;

					case ReportMessageType.Warning:
						return Brushes.Orange;

					case ReportMessageType.Error:
						return Brushes.Red;

					default:
						return Brushes.Black;
				}
			}
		}

		#endregion

		#region Constructors

		public MusicDownloaderReportItem(IReportMessage reportMessage)
		{
			if (reportMessage == null) return;

			Message = reportMessage.Message;
			Type = reportMessage.Type;

		}

		#endregion
	}
}
